//
//  MyFansTableViewCell.m
//  yilutongxing
//
//  Created by ios-21 on 17/4/26.
//  Copyright © 2017年 YZE. All rights reserved.
//

#import "MyFansTableViewCell.h"

@implementation MyFansTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.headImageView.layer.cornerRadius = 25;
    self.headImageView.layer.masksToBounds = YES;
    
    self.headImageView.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onAavatarTaped)];
    [self.headImageView addGestureRecognizer:tap];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)showBadge:(NSString *)count{
    if (!count) {
        self.badge.hidden = YES;
    }
    else {
        self.badge.hidden = NO;
        self.badge_count.text = count;
    }
}

- (void)onAavatarTaped{
    if (self.delegate && [self.delegate respondsToSelector:@selector(OnAvatarClicked:)]) {
        [self.delegate OnAvatarClicked:self.tag];
    }
}

@end
